package com.bw.demo_mvvm

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import czh.library.LikeView

class MainActivity : AppCompatActivity() {
    lateinit var likeView: LikeView
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        likeView = findViewById<LikeView>(R.id.lv)
    }

    fun click(view: View) {
        if (likeView.isChecked){
            likeView.unLike()
        }else{
            likeView.like()
        }
    }
}